/*
 * Copyright 2018 Shanxi Lu'an Taihang Laihui Net Tech co.,LTD.
 */
package src.com.bjsxt.height;

import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

/**
 * Description:
 *
 * @author wzz
 * @since: 1.0
 * Create Date Time: 2018/11/27 16:26
 * Update Date Time:
 */
public class Test {

    static class MyThread extends Thread{

        public void run(){
            System.out.println("我执行了");
        }
    }

    public static void main(String[] args) {
        MyThread m = new MyThread();
        ScheduledExecutorService service = Executors.newScheduledThreadPool(10);
        service.scheduleWithFixedDelay(m, 5, 1, TimeUnit.SECONDS);
    }
}
